import { createRouter, createWebHistory } from 'vue-router'
import Register from "@/components/register.vue";
import Login from "@/components/login.vue";
import Index from "@/components/index.vue";
import Main from "@/views/main.vue";
import Diary from "@/components/diary.vue";
import Eat from "@/components/eat.vue";
import My from "@/components/my.vue";

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      name: 'index',
      component: Index
    },
    {
      path: '/register',
      name: 'register',
      component: Register
    },
    {
      path: '/login',
      name: 'login',
      component: Login
    },
    {
      path:'/main',
      name:'main',
      component:Main
    },
    {
      path:'/diary',
      name:'diary',
      component:Diary
    },
    {
      path:'/eat',
      name:'eat',
      component:Eat
    },
    {
      path:'/my',
      name:'my',
      component:My
    }
  ]
})

export default router
